package com.itheima.enums;

/**
 * 类对应的描述信息
 */
public enum ClassDescEnum {
    CheckgroupController("CheckgroupController","检查组"),
    CheckItemController("CheckItemController","检查项"),
    MenuController("MenuController","菜单"),
    OrdersettingController("OrdersettingController","预约设置"),
    ReportController("ReportController","占比"),
    SetmealController("SetmealController","预约套餐"),
    UserController("UserController","用户"),
    RoleController("RoleController","角色");

    private String clazz;
    private String msg;
    private  ClassDescEnum(String clazz,String msg){
        this.clazz = clazz;
        this.msg = msg;
    }

    public String getClazz() {
        return clazz;
    }

    public String getMsg() {
        return msg;
    }

    public static String getClassMsg(String methodName){
        ClassDescEnum[] values = ClassDescEnum.values();
        for (ClassDescEnum value : values) {
            if(methodName.contains(value.clazz)){
                return value.msg;
            }
        }
        return null;
    }
}
